package com.flyduck.vueshop.order.h5.vo;

import com.flyduck.vueshop.order.constant.OrderConstant;
import com.flyduck.vueshop.order.entity.AppOrder;
import com.flyduck.vueshop.order.entity.AppOrderItem;
import com.flyduck.vueshop.order.entity.AppRefund;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * <p>
 * AppOrderRespVO
 * </p>
 *
 * @author flyduck
 * @since 2024-05-22
 */
@Data
public class H5OrderDetailsRespVO extends AppOrder implements Serializable {

    private List<AppOrderItemVO> orderItems;

    private AppRefundVO appRefund;

    //订单状态中文
    private String orderStatusStr;

    public String getOrderStatusStr() {
        return OrderConstant.OrderStatus.fromCode(getOrderStatus()).getDescription();
    }

    @Data
    public static class AppOrderItemVO extends AppOrderItem implements Serializable{

    }

    @Data
    public static class AppRefundVO extends AppRefund implements Serializable{

    }
}
